#pragma once

#ifndef STORAGE_H
#define STORAGE_H

#include "task.h"

class Storage
{
private:
	Task _userTask;
	
	// this keeps track of what the last action was
	Task _previousTask;

	// in the situation where the task is modify, the previous data is overwritten
	// thus, this will keep the previous data
	Task _previousData;

	// in the situation where the task is undo, the previous data is overwritten
	// thus, this will keep the previous data
	vector <Task> _previousStore;

	vector <Task> _store;
	vector <string> _forOutputBox;
	vector <Task> _archive;


	void executeCommand();
	void addTask();
	void deleteTask();
	void modify();
	void reset();
	void undo();
	void archive();
	Task convertToTask(string);
	string convertToString(Task);

public:
	Storage(void);
	~Storage(void);

	vector <string> start(Task);
	vector <Task> getStorage();
};

#endif
